package com.flying.pas.form.model;

import com.flying.common.util.Codes;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Property;
import com.flying.framework.data.Data;
import com.flying.framework.data.DataSerializable;
import com.flying.framework.metadata.Meta;

@SuppressWarnings("serial")
@Meta(id="f_field",title="字段", table="f_field", primaryKeys={"field_id"})
public class Field extends Data implements DataSerializable {
	public final static String ENTITY_NAME = "f_field";

	public final static String FIELD_ID = "field_id";
	public final static String FORM_ID = "form_id";
	public final static String TITLE = "title";
	public final static String NAME = "name";
	public final static String DATA_TYPE = "data_type";
	public final static String DISPLAY_TYPE = "display_type";
	public final static String ORDER_INDEX = "order_index";

	public final static String CONDITION = "query_condition";
	public final static String IS_COLUMN = "is_column";
	public final static String IS_FIELD = "is_field";
	public final static String READONLY = "readonly";
	
	public final static String DS_MODULE_ID = "ds_module_id";
	public final static String DS_SERVICE_ID = "ds_service_id";
	public final static String DS_QUERY = "ds_query";
	public final static String DS_URL = "ds_url";
	public final static String TEXT_FIELD = "text_field";
	public final static String VALUE_FIELD = "value_field";

	public final static String IS_REQUIRED = "is_required";
	public final static String MAX_LENGTH = "max_length";
	public final static String MIN_VALUE = "min_value";
	public final static String MAX_VALUE = "max_value";
	public final static String DATA_FORMAT = "data_format";

	public final static String REMARKS = "remarks";
	public final static String STYLE = "style";
	
	@Param(value=FIELD_ID,   required=true,   maxlength=0,	desc="字段ID" , generator=Codes.AUTO_INCREMENT, 
			props= {@Property(name="type",value="hidden")})
	private Long fieldId;
	
	@Param(value=FORM_ID,   required=true,   maxlength=0,	desc="表单ID", 
			props= {@Property(name="type",value="hidden")} )
	private Long formId;
	
	@Param(value=TITLE,   required=false,   maxlength=100,	desc="标题" )
	private String title;
	
	@Param(value=NAME,   required=true,   maxlength=40,	desc="字段名" )
	private String name;
	
	@Param(value=DATA_TYPE,   required=false,   maxlength=50,	desc="数据类型" )
	private String dataType;
	
	@Param(value=DISPLAY_TYPE,   required=false,   maxlength=50,	desc="显示类型" )
	private String displayType;
	
	@Param(value=ORDER_INDEX,   required=false,   maxlength=0,	desc="字段顺序" )
	private Integer orderIndex;
	
	@Param(value=DS_MODULE_ID,   required=false,   maxlength=50,	desc="数据源模块" )
	private String dsModuleId;
	
	@Param(value=DS_SERVICE_ID,   required=false,   maxlength=50,	desc="数据源服务ID" )
	private String dsServiceId;
	
	@Param(value=DS_QUERY,   required=false,   maxlength=50,	desc="数据源查询条件" )
	private String dsQuery;
	
	@Param(value=DS_URL,   required=false,   maxlength=100,	desc="数据源URL" )
	private String dsUrl;
	
	@Param(value=TEXT_FIELD,   required=false,   maxlength=50,	desc="显示字段" )
	private String textField;
	
	@Param(value=VALUE_FIELD,   required=false,   maxlength=50,	desc="值字段" )
	private String valueField;
	
	@Param(value=CONDITION,   required=false,   maxlength=10,	desc="查询条件" )
	private Integer condition;
	
	@Param(value=IS_COLUMN,   required=false,   maxlength=10,	desc="网格列" )
	private Integer isColumn;
	
	@Param(value=IS_FIELD,   required=false,   maxlength=10,	desc="表单字段" )
	private Integer isField;
	
	@Param(value=READONLY,   required=false,   maxlength=0,	desc="是否只读" )
	private Integer readonly;
	
	//
	@Param(value=IS_REQUIRED,   required=false,   maxlength=100,	desc="是否必需" )
	private Integer isRequired;
	
	@Param(value=MAX_LENGTH,   required=false,   maxlength=100,	desc="最大长度" )
	private Integer maxLength;
	
	@Param(value=MIN_VALUE,   required=false,   maxlength=100,	desc="最小值" )
	private String minValue;
	
	@Param(value=MAX_VALUE,   required=false,   maxlength=100,	desc="最大值" )
	private String maxValue;
	
	@Param(value=DATA_FORMAT,   required=false,   maxlength=100,	desc="诗句格式" )
	private String dataFormat;
	//
	@Param(value=STYLE,   required=false,   maxlength=100,	desc="显示样式" )
	private String style;
	
	@Param(value=REMARKS,   required=false,   maxlength=200,	desc="说明" )
	private String remarks;
	
	
	public String getDataType() {
		return this.dataType;
	}
	
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	
	public String getDisplayType() {
		return this.displayType;
	}
	
	public void setDisplayType(String displayType) {
		this.displayType = displayType;
	}
	
	public String getDsModuleId() {
		return dsModuleId;
	}

	public void setDsModuleId(String dsModuleId) {
		this.dsModuleId = dsModuleId;
	}

	public String getDsUrl() {
		return this.dsUrl;
	}
	
	public void setDsUrl(String dsUrl) {
		this.dsUrl = dsUrl;
	}
	
	public String getDsQuery() {
		return dsQuery;
	}

	public void setDsQuery(String dsQuery) {
		this.dsQuery = dsQuery;
	}

	public Long getFieldId() {
		return this.fieldId;
	}
	
	public void setFieldId(Long fieldId) {
		this.fieldId = fieldId;
	}
	
	public Long getFormId() {
		return this.formId;
	}
	
	public void setFormId(Long formId) {
		this.formId = formId;
	}
	
	public Integer getCondition() {
		return condition;
	}

	public void setCondition(Integer condition) {
		this.condition = condition;
	}

	public Integer getIsColumn() {
		return this.isColumn;
	}
	
	public void setIsColumn(Integer isColumn) {
		this.isColumn = isColumn;
	}
	
	public Integer getIsField() {
		return this.isField;
	}
	
	public void setIsField(Integer isField) {
		this.isField = isField;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getOrderIndex() {
		return this.orderIndex;
	}
	
	public void setOrderIndex(Integer orderIndex) {
		this.orderIndex = orderIndex;
	}
	
	public Integer getReadonly() {
		return this.readonly;
	}
	
	public void setReadonly(Integer readonly) {
		this.readonly = readonly;
	}
	
	public String getRemarks() {
		return this.remarks;
	}
	
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	public String getStyle() {
		return this.style;
	}
	
	public void setStyle(String style) {
		this.style = style;
	}
	
	public String getDsServiceId() {
		return dsServiceId;
	}

	public void setDsServiceId(String dsServiceId) {
		this.dsServiceId = dsServiceId;
	}

	public String getTextField() {
		return this.textField;
	}
	
	public void setTextField(String textField) {
		this.textField = textField;
	}
	
	public String getTitle() {
		return this.title;
	}
	
	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getValueField() {
		return this.valueField;
	}
	
	public void setValueField(String valueField) {
		this.valueField = valueField;
	}

	public Integer getIsRequired() {
		return isRequired;
	}

	public void setIsRequired(Integer isRequired) {
		this.isRequired = isRequired;
	}

	public Integer getMaxLength() {
		return maxLength;
	}

	public void setMaxLength(Integer maxLength) {
		this.maxLength = maxLength;
	}

	public String getMinValue() {
		return minValue;
	}

	public void setMinValue(String minValue) {
		this.minValue = minValue;
	}

	public String getMaxValue() {
		return maxValue;
	}

	public void setMaxValue(String maxValue) {
		this.maxValue = maxValue;
	}

	public String getDataFormat() {
		return dataFormat;
	}

	public void setDataFormat(String dataFormat) {
		this.dataFormat = dataFormat;
	}
	

}